package com.hl.service.impl;

import com.hl.domain.PsyAndTest;
import com.hl.domain.Psychometricassessment;
import com.hl.domain.Test1;
import com.hl.domain.TestNunber;
import com.hl.mapper.PsychometricassessmentMapper;
import com.hl.service.PsychometricassessmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PsychometricassessmentServiceImpl implements PsychometricassessmentService {
    @Autowired
    private PsychometricassessmentMapper p;

    @Override
    public List<Psychometricassessment> findLike(String name) {
        return p.finLike(name);
    }

    @Override
    public List<TestNunber> findAll() {
        List<TestNunber> psychometricassessment = p.findAll();

        return psychometricassessment;
    }

    @Override
    public int add(Psychometricassessment psychometricassessment) {
        return p.insert(psychometricassessment);
    }

    @Override
    public int del(int id) {
        return p.deleteByPrimaryKey((long) id);
    }

    @Override
    public int update(Psychometricassessment psychometricassessment) {
        return p.updateByPrimaryKey(psychometricassessment);
    }

    @Override
    public List<PsyAndTest> findPsyAndTest() {
        return p.finAll2();
    }

    @Override
    public List<Test1> findById(int id) {
        return p.findById((long) id);
    }


}
